(function (){
	var mCharts = echarts.init(document.querySelector("#singlebar"))
	var option = {
		title:{
			text:'柱状图',
			top:'3%',left:'center'
		},
		legend: {},
		tooltip: {
			trigger: "axis",
			axisPointer: {
				  type: "shadow"
				},
			position: function (pos, params, el, elRect, size) {
				var obj = {top: 10};
				obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 30;
				return obj;
			},
			extraCssText: 'width: 170px'
		},
		// grid:[
		// 	{bottom:61,left:'center'},
		// 	{height:60,
		// 	bottom:0,
		// 	left:'center'}
		// ],
		dataset:{
			source:thedata
		},
		xAxis:[{
			type:'category'
		},
			{
				type:'category'
			}
		],
		
		yAxis:[{},{}],
		series:[
			{
				xAxisIndex:0,
				yAxisIndex:0,
				type:'bar'
			},
			{
				xAxisIndex:1,
				type:'bar'
			}
		]
	};
mCharts.setOption(option)
})();
			